#include "cpu/exec/template-start.h"

#define instr push 

//push_r_l的decode_r_l已存在
static void do_execute() { //静态，因为只在内部调用，每个指令都有这个重名的函数
    current_sreg = R_SS;//栈指令提前设定好段寄存器SS
    if (DATA_BYTE == 2){
        cpu.esp -= 2;
        swaddr_write(cpu.esp, 2, (DATA_TYPE)op_src->val);
    }
    else {
        if (DATA_BYTE == 1) op_src->val = (int8_t)op_src->val;
        cpu.esp -= 4;
        swaddr_write(cpu.esp, 4, op_src->val);
    }
    print_asm_template1();//打印单目操作数指令的反汇编结果
}

#if DATA_BYTE == 2 || DATA_BYTE == 4
make_instr_helper(r)
make_instr_helper(rm)
#endif
make_instr_helper(i)

#include "cpu/exec/template-end.h"
